Bech32 Rust
Rust implementation of the Bech32 encoding format described in BIP-0173.
Bitcoin-specific address encoding is handled by the bitcoin-bech32
crate.
Examples
use Bech32;
let b = new_check_data.unwrap;
let encoded = b.to_string;
assert_eq!;
let c = encoded.;
assert_eq!;
If the data is already range-checked the Bech32::new
function can be used which will never
return Err(Error::InvalidData)
.
use ;
// converts base256 data to base32 and adds padding if needed
let checked_data: = .to_base32;
let b = new.expect;
let encoded = b.to_string;
assert_eq!;